<template>
    <div>
        <van-nav-bar title="商品列表" left-text="返回" left-arrow @click-left="($router.push('/detail'))" />
        <div >
            <!-- <router-link :to="{ name: 'detail', params:{ goods_id:item.goods_id } }"> -->
                <!-- <van-card :price="item.goods.goods_price" :title="item.goods.goods_name">
                    <img :src="item.goods.goods_small_logo ? item.goods.goods_small_logo : 'https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg'"
                        alt="">
                </van-card> -->
                <van-card num="2" price="2.00" desc="描述信息" title="商品标题" thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"/>
             <van-card num="2" price="2.00" desc="描述信息" title="商品标题" thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg" @click="add"/>

            <!-- </router-link> -->
             
            




        </div>

    </div>
</template>

<script>
import { ref } from 'vue';
import { searchApi } from '@/api/api';
import { useRoute } from 'vue-router';
import router from '@/router';
const route = useRoute()
let search = ref([])
 const add=()=>{
    router.push('/detail')
 }
// searchApi(route.params.cat_name).then(res=>{
//     console.log('列表数据',res)
//     search.value=res.data.message.goods
    
// })

</script>

<style lang="scss" scoped></style>